//
//  SEPrescriptionOrderDrugFooterView.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/4/17.
//

import UIKit

class SEPrescriptionOrderDrugFooterView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        setUI()
    }

    func setUI() {
        addSubview(titleLabel)
        addSubview(feeLabel)
        addSubview(lineView)

        feeLabel.snp.makeConstraints { (make) in
            make.right.equalTo(-15)
            make.centerY.equalTo(snp.centerY)
        }

        titleLabel.snp.makeConstraints { (make) in
            make.right.equalTo(feeLabel.snp.left).offset(-5)
            make.centerY.equalTo(feeLabel.snp.centerY)
        }

        lineView.snp.makeConstraints { (make) in
            make.left.equalTo(15)
            make.right.equalTo(-15)
            make.height.equalTo(1)
            make.bottom.equalTo(0)
        }
    }

    lazy var feeLabel: UILabel = {
        let label = UILabel()
        label.text = "10.5元"
        label.textColor = UIColor.init(hex: "#F7B500")
        label.font = UIFont.regular(14)
        label.textAlignment = .right
        return label
    }()

    lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.text = "合计"
        label.textColor = Asset.textDark.color
        label.font = UIFont.regular(14)
        label.textAlignment = .right
        return label
    }()

    lazy var lineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.init(hex: "#F4F4F4")
        return view
    }()

}
